<%@page import="com.Service.BO.OrganizationBO"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%@page import="com.ServiceController.SupportController"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title>Service Directory</title>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
        <style media="all" type="text/css">
            @import "css/all.css";.MandatoryColour {
                color: #F00;
            }
            #main #middle #center-column form .listing.form .bg .first #TabbedPanels2 .TabbedPanelsContentGroup .TabbedPanelsContent.TabbedPanelsContentVisible table tr td {
                font-weight: normal;
            }
        </style>
        <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
        <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    </head>
    <body>
        <div id="main">

            <div id="header">
                <a href="index.html" class="logo"><img src="img/logo.png" width="954" height="112" alt="" /></a>


            </div>
            <script type="text/javascript">
                
                function ValidateSup()
                {
                    var url = document.forms["addsup"]["url"].value;
                    var bate = document.forms["addsup"]["addeddate"].value;
                    
                    if(url == "" || url == null)
                    {
                        alert("URL Field can not be empty");
                        return false;
                    }
                }
            </script>
            <div id="middle">
                <div id="left-column">
                    <h3>Home</h3>
                    <ul class="nav">
                        <li><a href="ListOrganController">Organization</a></li>
                        <li></li>
                        <li><a href="Services.jsp">Services</a></li>
                        <li><a href="Premises.jsp">Premises</a></li>
                        <li><a href="#">Forum</a>			    </li>
                        <li class="last"><a href="#">Fsoft Mail</a></li>
                    </ul>
                    <h3>Geograpphy</h3>
                    <ul class="nav">
                        <li><a href="TRegion.jsp">Trust region</a></li>

                        <li><a href="GovRegion.jsp">Government Region</a></li>
                    </ul>
                    <a href="#" class="link">Help</a>
                    <a href="index.jsp" class="link">Logout</a>
                </div>
                <div></div>
                <div id="center-column"><br />
                    <form id="addsup" name="addsup" action="SupportController" method="get" onsubmit="return ValidateSup()">
                        <div class="table">
                            <img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
                            <img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" />
                            <table class="listing form" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th class="full">Supporting materials details</th>
                                </tr>
                                <tr class="bg">
                                    <td height="174" class="first"><div id="TabbedPanels2" class="TabbedPanels">
                                            <ul class="TabbedPanelsTabGroup">
                                                <li class="TabbedPanelsTab" tabindex="0">Details</li>
                                            </ul>
                                            <div class="TabbedPanelsContentGroup">
                                                <div class="TabbedPanelsContent">
                                                    <table width="568" border="0" cellspacing="2" cellpadding="2">
                                                        <tr>
                                                            <td width="140">URL : <span class="MandatoryColour">*</span></td>
                                                            <td width="245"><label for="url"></label>
                                                                <input type="text" name="url" id="url" /></td>
                                                            <td width="124">Added by:</td>
                                                            <td width="33"><label for="addedby"></label>
                                                                <input type="text" name="addedby" id="addedby" /></td>
                                                        </tr>
                                                        <tr>
                                                            <td>Description :</td>
                                                            <td><label for="description"></label>
                                                                <textarea name="description" id="description" cols="30" rows="3"></textarea></td>
                                                            <td>added date:</td>
                                                            <td><label for="addeddate"></label>
                                                                <input type="text" name="addeddate" id="addeddate" /> (YYYY/MM/DD)</td>
                                                        </tr>
                                                        <tr>
                                                            <td>Type :</td>
                                                            <td><label for="type"></label>
                                                                <select name="type" id="type">
                                                                    <option>Select</option>
                                                                    <option>Doc</option>
                                                                    <option>PDF</option>
                                                                    <option>Excel</option>
                                                                </select></td>
                                                            <td>&nbsp;</td>
                                                            <td>&nbsp;</td>
                                                        </tr>
                                                        <tr>
                                                            
                                                            <td>Organization Name : </td>
                                                            <td><label for="orgname"></label>
                                                             
                                                                <select name="orgname" id="orgname" >
                                                                    <option>Select</option>
                                                                    
                                                                       <%
                                                                List gist = (List) request.getAttribute("OrgName");
                                                                Iterator ite = gist.iterator();
                                                                while (ite.hasNext()) {
                                                                    OrganizationBO org = (OrganizationBO)ite.next();
                                                                    String name = org.getName();
                                                                    int id = org.getId();
                                                            %>
                                                            
                                                            <option value="<%=id%>"><%=name%></option>
                                                                   <%  
                                                                }
                                                                    %>
                                                                </select></td>
                                                                 
                                                            <td>&nbsp;</td>
                                                            <td>&nbsp;</td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>					    <label for="CHECK3"></label></td>
                                </tr>
                                <tr class="bg">
                                    <td class="first"><input type="submit" name="Save" id="Save" value="Save" />
                                        </form>

                                        <form id="backy" name="backy" method="get" action="SpecialismController">
                                            <td><input type="submit" name="Back" id="Back" value="Back" /></td>
                                            </tr>
                                            </table></form>
                                        <p>&nbsp;</p>
                                        </div>
                                        </div>
                                        <div id="right-column">
                                            <strong class="h">INFO</strong>
                                            <div class="box">This screen is use to add supporting materials for organization</div>
                                        </div>
                                        </div>
                                        <div id="footer">
                                            <p>&nbsp;</p>
                                            <p>&nbsp;</p>
                                        </div>
                                        </div>
                                        <script type="text/javascript">
                                            var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2");
                                        </script>
                                        </body>
                                        </html>
